package com.design.合成模式;

public class TestMain {

	public static void main(String[] args) {
		
		Entry b = new Directory("bin");
		
		b.add(new File("bash",4))
		 .add(new File("ls",6));
		
		Entry root = new Directory("root");
		root.add(b);
		
		Entry s = new Directory("su - ");
		s.add(root);
		s.printList();
		
	}
	
}
